//*******1*********2*********3*********4*********5*********6*********7*********8
// ICS340Final.java, Jay Ripley, riplja@metrostate.edu, Final, Apr 12 2012

import java.awt.*;
import java.lang.reflect.InvocationTargetException;

import javax.swing.*;

/**
 * Java CLI / Applet Harness - Launches app based on conditions provided. Setup
 * as per requirement
 * 
 * @author Jay & Simeon gbolo
 * 
 */
public class ICS340Final extends JApplet {

	/**
	 * Core setup behaviors for JApplet behavior. Insert initializing behaviors
	 * here.
	 */
	@Override
	public void init()
	{
		try
		{
			javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
				public void run()
				{
					begin();
				}
			});
		} catch (InterruptedException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InvocationTargetException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	/**
	 * Core start behaviors for JApplet application. Insert core functionality
	 * here.
	 */
	public void begin()
	{

		Main mainApplication = new Main();
		setLayout(new BorderLayout());
		add(mainApplication, BorderLayout.CENTER);
		setSize(900, 700);
	}

	// Required UUID.
	private static final long serialVersionUID = 4264463322004027901L;
	// Flag to indicate Applet Launch State.
	boolean isApplet = true;
}
